cc = gcc
asm = nasm

all:Boot.bin KernelLoader.bin image

Boot.bin:Boot.asm Boot.bin
	$(asm) -o Boot.bin Boot.asm

KernelLoader.bin:KernelLoader.asm KernelLoader.bin
	$(asm) -o KernelLoader.bin KernelLoader.asm

image:Boot.bin KernelLoader.bin
	dd if=/dev/zero of=exos.img bs=50000000 count=1 conv=notrunc
	dd if=Boot.bin of=exos.img bs=512 count=1 conv=notrunc
	dd if=KernelLoader.bin of=exos.img bs=512 count=4 seek=2 conv=notrunc

run:image
	qemu-system-x86_64 ./exos.img

.PHONY:clean
clean:
	rm -f *.bin
	